package xyz.wadewhy.basicstest.kotlin

/**
 *@ClassName test
 *@Description 业务用途
 *@Author zhongzihao
 *@Date 2022/1/5 3:18 下午
 *@Version 1.0
 **/

import com.alibaba.fastjson.JSON

/**
 *@ClassName ActiviteTeacherSkillRecords
 *@Description 业务用途
 *@Author zhongzihao
 *@Date 2022/1/5 2:56 下午
 *@Version 1.0
 **/
class ActivityTeacherSkillRecords {
    var classEducationStory: List<ActivityRecords> = emptyList()
    var classManagementMethod: List<ActivityRecords> = emptyList()
    var themeClassMeetingDesign: List<ActivityRecords> = emptyList()
}
class Test2{

}
class ActivityTeacherSkillRecordDetailVo {
    //顶部图片，第一张
    var topImage: String = ""

    //视频url
    var videoUrl: String = ""

    //课件url
    var coursewareUrl: String = ""

    //切图数组
    var images: List<String> = emptyList()

    //票数
    var votes: Int = 0

    //教师名字
    var teacherName: String = ""

    var resourceId: String = ""

    //ActivityTeacherGroupEnum枚举
    var group: Int = 0

    //头像
    var avatar: String = ""
}


class ActivityRecords {
    //作品标题
    var title: String = ""

    //教师名字
    var teacherName: String = ""

    //封面图片
    var coverImage: String = ""

    //得票数
    var votes: Int = 0

    //分组 ActivityTeacherGroupEnum枚举
    var group: Int = 0
}

fun main() {
    test1()
}

fun test2() {

}


fun test1() {
    val record = ActivityRecords().apply {
        this.title = "作品标题"
        this.teacherName = "教师名字"
        this.coverImage = "封面图片"
        this.votes = 100
        this.group = 0
    }
    val record1 = mutableListOf<ActivityRecords>(record)
    val record2 = mutableListOf<ActivityRecords>(record)
    val record3 = mutableListOf<ActivityRecords>(record)
    val json = ActivityTeacherSkillRecords()
    json.classEducationStory = record1
    json.classManagementMethod = record2
    json.themeClassMeetingDesign = record3
    println(JSON.toJSONString(json))

    val ss = ActivityTeacherSkillRecordDetailVo().apply {
        this.topImage = "https://store-tg1.cvte.com/easicare-v2-test/d34e20fd94fd4256bb3eaba5839ed692"
        this.videoUrl = "https://store-g1.seewo.com/FpIRI5fmB-5y10DYsheQMVgfxnSa"
        this.votes = 100
        this.coursewareUrl = "https://store-g1.seewo.com/FpIRI5fmB-5y10DYsheQMVgfxnSa"
        this.images = listOf(
            "https://store-g1.seewo.com/FpIRI5fmB-5y10DYsheQMVgfxnSa",
            "https://store-g1.seewo.com/FpIRI5fmB-5y10DYsheQMVgfxnSa"
        )
        this.resourceId = "gasdgjahsg1212312"
        this.group = 2
        this.avatar = "https://store-g1.seewo.com/FpIRI5fmB-5y10DYsheQMVgfxnSa"
    }

    println(JSON.toJSONString(ss))
}